Skip to content

Conversation

@mgudim
Copy link
Contributor

@mgudim mgudim commented Nov 18, 2025

Currently there is an implicit assumption in CFIInstrInserter that a CSR can be saved only in one location. However, scenarios when this assumption breaks are possible.

@llvmbot
Copy link
Member

llvmbot commented Nov 18, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Mikhail Gudim (mgudim)

Changes

Currently there is an implicit assumption in CFIInstrInserter that a CSR can be saved only in one location. However, scenarios when this assumption breaks are possible.


Full diff: https://github.com/llvm/llvm-project/pull/168531.diff

2 Files Affected:

  • (modified) llvm/lib/CodeGen/CFIInstrInserter.cpp (+197-144)
  • (modified) llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir (-2)
diff --git a/llvm/lib/CodeGen/CFIInstrInserter.cpp b/llvm/lib/CodeGen/CFIInstrInserter.cpp
index 14098bc821617..667928304df50 100644
--- a/llvm/lib/CodeGen/CFIInstrInserter.cpp
+++ b/llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -66,72 +66,103 @@ class CFIInstrInserter : public MachineFunctionPass {
   }
 
  private:
-  struct MBBCFAInfo {
-    MachineBasicBlock *MBB;
-    /// Value of cfa offset valid at basic block entry.
-    int64_t IncomingCFAOffset = -1;
-    /// Value of cfa offset valid at basic block exit.
-    int64_t OutgoingCFAOffset = -1;
-    /// Value of cfa register valid at basic block entry.
-    unsigned IncomingCFARegister = 0;
-    /// Value of cfa register valid at basic block exit.
-    unsigned OutgoingCFARegister = 0;
-    /// Set of callee saved registers saved at basic block entry.
-    BitVector IncomingCSRSaved;
-    /// Set of callee saved registers saved at basic block exit.
-    BitVector OutgoingCSRSaved;
-    /// If in/out cfa offset and register values for this block have already
-    /// been set or not.
-    bool Processed = false;
-  };
-
 #define INVALID_REG UINT_MAX
 #define INVALID_OFFSET INT_MAX
-  /// contains the location where CSR register is saved.
-  struct CSRSavedLocation {
-    CSRSavedLocation(std::optional<unsigned> R, std::optional<int> O)
-        : Reg(R), Offset(O) {}
-    std::optional<unsigned> Reg;
-    std::optional<int> Offset;
-  };
-
-  /// Contains cfa offset and register values valid at entry and exit of basic
-  /// blocks.
-  std::vector<MBBCFAInfo> MBBVector;
-
-  /// Map the callee save registers to the locations where they are saved.
-  SmallDenseMap<unsigned, CSRSavedLocation, 16> CSRLocMap;
-
-  /// Calculate cfa offset and register values valid at entry and exit for all
-  /// basic blocks in a function.
-  void calculateCFAInfo(MachineFunction &MF);
-  /// Calculate cfa offset and register values valid at basic block exit by
-  /// checking the block for CFI instructions. Block's incoming CFA info remains
-  /// the same.
-  void calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo);
-  /// Update in/out cfa offset and register values for successors of the basic
-  /// block.
-  void updateSuccCFAInfo(MBBCFAInfo &MBBInfo);
-
-  /// Check if incoming CFA information of a basic block matches outgoing CFA
-  /// information of the previous block. If it doesn't, insert CFI instruction
-  /// at the beginning of the block that corrects the CFA calculation rule for
-  /// that block.
-  bool insertCFIInstrs(MachineFunction &MF);
-  /// Return the cfa offset value that should be set at the beginning of a MBB
-  /// if needed. The negated value is needed when creating CFI instructions that
-  /// set absolute offset.
-  int64_t getCorrectCFAOffset(MachineBasicBlock *MBB) {
-    return MBBVector[MBB->getNumber()].IncomingCFAOffset;
-  }
-
-  void reportCFAError(const MBBCFAInfo &Pred, const MBBCFAInfo &Succ);
-  void reportCSRError(const MBBCFAInfo &Pred, const MBBCFAInfo &Succ);
-  /// Go through each MBB in a function and check that outgoing offset and
-  /// register of its predecessors match incoming offset and register of that
-  /// MBB, as well as that incoming offset and register of its successors match
-  /// outgoing offset and register of the MBB.
-  unsigned verify(MachineFunction &MF);
+   /// contains the location where CSR register is saved.
+   struct CSRSavedLocation {
+     enum Kind { INVALID, REGISTER, CFA_OFFSET };
+     CSRSavedLocation() {
+       K = Kind::INVALID;
+       Reg = 0;
+       Offset = 0;
+     }
+     Kind K;
+     // Dwarf register number
+     unsigned Reg;
+     // CFA offset
+     int64_t Offset;
+     bool isValid() const { return K != Kind::INVALID; }
+     bool operator==(const CSRSavedLocation &RHS) const {
+       switch (K) {
+       case Kind::INVALID:
+         return !RHS.isValid();
+       case Kind::REGISTER:
+         return Reg == RHS.Reg;
+       case Kind::CFA_OFFSET:
+         return Offset == RHS.Offset;
+       }
+       llvm_unreachable("Unknown CSRSavedLocation Kind!");
+     }
+     void dump(raw_ostream &OS) const {
+       switch (K) {
+       case Kind::INVALID:
+         OS << "INVALID";
+         break;
+       case Kind::REGISTER:
+         OS << "In Dwarf register: " << Reg;
+         break;
+       case Kind::CFA_OFFSET:
+         OS << "At CFA offset: " << Offset;
+         break;
+       }
+     }
+   };
+
+   struct MBBCFAInfo {
+     MachineBasicBlock *MBB;
+     /// Value of cfa offset valid at basic block entry.
+     int64_t IncomingCFAOffset = -1;
+     /// Value of cfa offset valid at basic block exit.
+     int64_t OutgoingCFAOffset = -1;
+     /// Value of cfa register valid at basic block entry.
+     unsigned IncomingCFARegister = 0;
+     /// Value of cfa register valid at basic block exit.
+     unsigned OutgoingCFARegister = 0;
+     /// Set of locations where the callee saved registers are at basic block
+     /// entry.
+     SmallVector<CSRSavedLocation> IncomingCSRLocations;
+     /// Set of locations where the callee saved registers are at basic block
+     /// exit.
+     SmallVector<CSRSavedLocation> OutgoingCSRLocations;
+     /// If in/out cfa offset and register values for this block have already
+     /// been set or not.
+     bool Processed = false;
+   };
+
+   /// Contains cfa offset and register values valid at entry and exit of basic
+   /// blocks.
+   std::vector<MBBCFAInfo> MBBVector;
+
+   /// Calculate cfa offset and register values valid at entry and exit for all
+   /// basic blocks in a function.
+   void calculateCFAInfo(MachineFunction &MF);
+   /// Calculate cfa offset and register values valid at basic block exit by
+   /// checking the block for CFI instructions. Block's incoming CFA info
+   /// remains the same.
+   void calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo);
+   /// Update in/out cfa offset and register values for successors of the basic
+   /// block.
+   void updateSuccCFAInfo(MBBCFAInfo &MBBInfo);
+
+   /// Check if incoming CFA information of a basic block matches outgoing CFA
+   /// information of the previous block. If it doesn't, insert CFI instruction
+   /// at the beginning of the block that corrects the CFA calculation rule for
+   /// that block.
+   bool insertCFIInstrs(MachineFunction &MF);
+   /// Return the cfa offset value that should be set at the beginning of a MBB
+   /// if needed. The negated value is needed when creating CFI instructions
+   /// that set absolute offset.
+   int64_t getCorrectCFAOffset(MachineBasicBlock *MBB) {
+     return MBBVector[MBB->getNumber()].IncomingCFAOffset;
+   }
+
+   void reportCFAError(const MBBCFAInfo &Pred, const MBBCFAInfo &Succ);
+   void reportCSRError(const MBBCFAInfo &Pred, const MBBCFAInfo &Succ);
+   /// Go through each MBB in a function and check that outgoing offset and
+   /// register of its predecessors match incoming offset and register of that
+   /// MBB, as well as that incoming offset and register of its successors match
+   /// outgoing offset and register of the MBB.
+   unsigned verify(MachineFunction &MF);
 };
 }  // namespace
 
@@ -162,10 +193,18 @@ void CFIInstrInserter::calculateCFAInfo(MachineFunction &MF) {
     MBBInfo.OutgoingCFAOffset = InitialOffset;
     MBBInfo.IncomingCFARegister = DwarfInitialRegister;
     MBBInfo.OutgoingCFARegister = DwarfInitialRegister;
-    MBBInfo.IncomingCSRSaved.resize(NumRegs);
-    MBBInfo.OutgoingCSRSaved.resize(NumRegs);
+    MBBInfo.IncomingCSRLocations.resize(NumRegs);
+    MBBInfo.OutgoingCSRLocations.resize(NumRegs);
+  }
+
+  // Record the initial location of all registers.
+  MBBCFAInfo &EntryMBBInfo = MBBVector[MF.front().getNumber()];
+  const MCPhysReg *CSRegs = MF.getRegInfo().getCalleeSavedRegs();
+  for (int i = 0; CSRegs[i]; ++i) {
+    unsigned Reg = TRI.getDwarfRegNum(CSRegs[i], true);
+    CSRSavedLocation &CSRLoc = EntryMBBInfo.IncomingCSRLocations[Reg];
+    CSRLoc.Reg = Reg;
   }
-  CSRLocMap.clear();
 
   // Set in/out cfa info for all blocks in the function. This traversal is based
   // on the assumption that the first block in the function is the entry block
@@ -176,14 +215,18 @@ void CFIInstrInserter::calculateCFAInfo(MachineFunction &MF) {
 
 void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
   // Outgoing cfa offset set by the block.
-  int64_t SetOffset = MBBInfo.IncomingCFAOffset;
+  int64_t &OutgoingCFAOffset = MBBInfo.OutgoingCFAOffset;
+  OutgoingCFAOffset = MBBInfo.IncomingCFAOffset;
   // Outgoing cfa register set by the block.
-  unsigned SetRegister = MBBInfo.IncomingCFARegister;
+  unsigned &OutgoingCFARegister = MBBInfo.OutgoingCFARegister;
+  OutgoingCFARegister = MBBInfo.IncomingCFARegister;
+  // Outgoing locations for each callee-saved register set by the block.
+  SmallVector<CSRSavedLocation> &OutgoingCSRLocations =
+      MBBInfo.OutgoingCSRLocations;
+  OutgoingCSRLocations = MBBInfo.IncomingCSRLocations;
+
   MachineFunction *MF = MBBInfo.MBB->getParent();
   const std::vector<MCCFIInstruction> &Instrs = MF->getFrameInstructions();
-  const TargetRegisterInfo &TRI = *MF->getSubtarget().getRegisterInfo();
-  unsigned NumRegs = TRI.getNumSupportedRegs(*MF);
-  BitVector CSRSaved(NumRegs), CSRRestored(NumRegs);
 
 #ifndef NDEBUG
   int RememberState = 0;
@@ -192,36 +235,51 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
   // Determine cfa offset and register set by the block.
   for (MachineInstr &MI : *MBBInfo.MBB) {
     if (MI.isCFIInstruction()) {
-      std::optional<unsigned> CSRReg;
-      std::optional<int64_t> CSROffset;
       unsigned CFIIndex = MI.getOperand(0).getCFIIndex();
       const MCCFIInstruction &CFI = Instrs[CFIIndex];
       switch (CFI.getOperation()) {
-      case MCCFIInstruction::OpDefCfaRegister:
-        SetRegister = CFI.getRegister();
+      case MCCFIInstruction::OpDefCfaRegister: {
+        OutgoingCFARegister = CFI.getRegister();
         break;
-      case MCCFIInstruction::OpDefCfaOffset:
-        SetOffset = CFI.getOffset();
+      }
+      case MCCFIInstruction::OpDefCfaOffset: {
+        OutgoingCFAOffset = CFI.getOffset();
         break;
-      case MCCFIInstruction::OpAdjustCfaOffset:
-        SetOffset += CFI.getOffset();
+      }
+      case MCCFIInstruction::OpAdjustCfaOffset: {
+        OutgoingCFAOffset += CFI.getOffset();
         break;
-      case MCCFIInstruction::OpDefCfa:
-        SetRegister = CFI.getRegister();
-        SetOffset = CFI.getOffset();
+      }
+      case MCCFIInstruction::OpDefCfa: {
+        OutgoingCFARegister = CFI.getRegister();
+        OutgoingCFAOffset = CFI.getOffset();
         break;
-      case MCCFIInstruction::OpOffset:
-        CSROffset = CFI.getOffset();
+      }
+      case MCCFIInstruction::OpOffset: {
+        CSRSavedLocation &CSRLocation = OutgoingCSRLocations[CFI.getRegister()];
+        CSRLocation.K = CSRSavedLocation::Kind::CFA_OFFSET;
+        CSRLocation.Offset = CFI.getOffset();
         break;
-      case MCCFIInstruction::OpRegister:
-        CSRReg = CFI.getRegister2();
+      }
+      case MCCFIInstruction::OpRegister: {
+        CSRSavedLocation &CSRLocation = OutgoingCSRLocations[CFI.getRegister()];
+        CSRLocation.K = CSRSavedLocation::Kind::REGISTER;
+        CSRLocation.Reg = CFI.getRegister2();
         break;
-      case MCCFIInstruction::OpRelOffset:
-        CSROffset = CFI.getOffset() - SetOffset;
+      }
+      case MCCFIInstruction::OpRelOffset: {
+        CSRSavedLocation &CSRLocation = OutgoingCSRLocations[CFI.getRegister()];
+        CSRLocation.K = CSRSavedLocation::Kind::CFA_OFFSET;
+        CSRLocation.Offset = CFI.getOffset() - OutgoingCFAOffset;
         break;
-      case MCCFIInstruction::OpRestore:
-        CSRRestored.set(CFI.getRegister());
+      }
+      case MCCFIInstruction::OpRestore: {
+        unsigned Reg = CFI.getRegister();
+        CSRSavedLocation &CSRLocation = OutgoingCSRLocations[Reg];
+        CSRLocation.K = CSRSavedLocation::Kind::REGISTER;
+        CSRLocation.Reg = Reg;
         break;
+      }
       case MCCFIInstruction::OpLLVMDefAspaceCfa:
         // TODO: Add support for handling cfi_def_aspace_cfa.
 #ifndef NDEBUG
@@ -266,16 +324,6 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
       case MCCFIInstruction::OpValOffset:
         break;
       }
-      if (CSRReg || CSROffset) {
-        auto It = CSRLocMap.find(CFI.getRegister());
-        if (It == CSRLocMap.end()) {
-          CSRLocMap.insert(
-              {CFI.getRegister(), CSRSavedLocation(CSRReg, CSROffset)});
-        } else if (It->second.Reg != CSRReg || It->second.Offset != CSROffset) {
-          llvm_unreachable("Different saved locations for the same CSR");
-        }
-        CSRSaved.set(CFI.getRegister());
-      }
     }
   }
 
@@ -288,15 +336,6 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
 #endif
 
   MBBInfo.Processed = true;
-
-  // Update outgoing CFA info.
-  MBBInfo.OutgoingCFAOffset = SetOffset;
-  MBBInfo.OutgoingCFARegister = SetRegister;
-
-  // Update outgoing CSR info.
-  BitVector::apply([](auto x, auto y, auto z) { return (x | y) & ~z; },
-                   MBBInfo.OutgoingCSRSaved, MBBInfo.IncomingCSRSaved, CSRSaved,
-                   CSRRestored);
 }
 
 void CFIInstrInserter::updateSuccCFAInfo(MBBCFAInfo &MBBInfo) {
@@ -312,7 +351,7 @@ void CFIInstrInserter::updateSuccCFAInfo(MBBCFAInfo &MBBInfo) {
       if (!SuccInfo.Processed) {
         SuccInfo.IncomingCFAOffset = CurrentInfo.OutgoingCFAOffset;
         SuccInfo.IncomingCFARegister = CurrentInfo.OutgoingCFARegister;
-        SuccInfo.IncomingCSRSaved = CurrentInfo.OutgoingCSRSaved;
+        SuccInfo.IncomingCSRLocations = CurrentInfo.OutgoingCSRLocations;
         Stack.push_back(Succ);
       }
     }
@@ -324,7 +363,6 @@ bool CFIInstrInserter::insertCFIInstrs(MachineFunction &MF) {
   const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
   bool InsertedCFIInstr = false;
 
-  BitVector SetDifference;
   for (MachineBasicBlock &MBB : MF) {
     // Skip the first MBB in a function
     if (MBB.getNumber() == MF.front().getNumber()) continue;
@@ -376,32 +414,34 @@ bool CFIInstrInserter::insertCFIInstrs(MachineFunction &MF) {
       continue;
     }
 
-    BitVector::apply([](auto x, auto y) { return x & ~y; }, SetDifference,
-                     PrevMBBInfo->OutgoingCSRSaved, MBBInfo.IncomingCSRSaved);
-    for (int Reg : SetDifference.set_bits()) {
-      unsigned CFIIndex =
-          MF.addFrameInst(MCCFIInstruction::createRestore(nullptr, Reg));
-      BuildMI(*MBBInfo.MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
-          .addCFIIndex(CFIIndex);
-      InsertedCFIInstr = true;
-    }
-
-    BitVector::apply([](auto x, auto y) { return x & ~y; }, SetDifference,
-                     MBBInfo.IncomingCSRSaved, PrevMBBInfo->OutgoingCSRSaved);
-    for (int Reg : SetDifference.set_bits()) {
-      auto it = CSRLocMap.find(Reg);
-      assert(it != CSRLocMap.end() && "Reg should have an entry in CSRLocMap");
-      unsigned CFIIndex;
-      CSRSavedLocation RO = it->second;
-      if (!RO.Reg && RO.Offset) {
-        CFIIndex = MF.addFrameInst(
-            MCCFIInstruction::createOffset(nullptr, Reg, *RO.Offset));
-      } else if (RO.Reg && !RO.Offset) {
+    for (unsigned i = 0; i < PrevMBBInfo->OutgoingCSRLocations.size(); ++i) {
+      const CSRSavedLocation &PrevOutgoingCSRLoc =
+          PrevMBBInfo->OutgoingCSRLocations[i];
+      const CSRSavedLocation &HasToBeCSRLoc = MBBInfo.IncomingCSRLocations[i];
+      // Ignore non-callee-saved registers, they remain uninitialized (invalid).
+      if (!HasToBeCSRLoc.isValid())
+        continue;
+      if (HasToBeCSRLoc == PrevOutgoingCSRLoc)
+        continue;
+
+      unsigned CFIIndex = (unsigned)(-1);
+      if (HasToBeCSRLoc.K == CSRSavedLocation::Kind::CFA_OFFSET &&
+          HasToBeCSRLoc.Offset != PrevOutgoingCSRLoc.Offset) {
         CFIIndex = MF.addFrameInst(
-            MCCFIInstruction::createRegister(nullptr, Reg, *RO.Reg));
-      } else {
-        llvm_unreachable("RO.Reg and RO.Offset cannot both be valid/invalid");
-      }
+            MCCFIInstruction::createOffset(nullptr, i, HasToBeCSRLoc.Offset));
+      } else if (HasToBeCSRLoc.K == CSRSavedLocation::Kind::REGISTER &&
+                 (HasToBeCSRLoc.Reg != PrevOutgoingCSRLoc.Reg)) {
+        unsigned NewReg = HasToBeCSRLoc.Reg;
+        unsigned DwarfEHReg = i;
+        if (NewReg == DwarfEHReg) {
+          CFIIndex = MF.addFrameInst(
+              MCCFIInstruction::createRestore(nullptr, DwarfEHReg));
+        } else {
+          CFIIndex = MF.addFrameInst(
+              MCCFIInstruction::createRegister(nullptr, i, HasToBeCSRLoc.Reg));
+        }
+      } else
+        llvm_unreachable("Unexpected CSR location.");
       BuildMI(*MBBInfo.MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
           .addCFIIndex(CFIIndex);
       InsertedCFIInstr = true;
@@ -434,13 +474,23 @@ void CFIInstrInserter::reportCSRError(const MBBCFAInfo &Pred,
          << Pred.MBB->getParent()->getName() << " ***\n";
   errs() << "Pred: " << Pred.MBB->getName() << " #" << Pred.MBB->getNumber()
          << " outgoing CSR Saved: ";
-  for (int Reg : Pred.OutgoingCSRSaved.set_bits())
-    errs() << Reg << " ";
+  for (const CSRSavedLocation &OutgoingCSRLocation :
+       Pred.OutgoingCSRLocations) {
+    if (OutgoingCSRLocation.isValid()) {
+      OutgoingCSRLocation.dump(errs());
+      errs() << " ";
+    }
+  }
   errs() << "\n";
   errs() << "Succ: " << Succ.MBB->getName() << " #" << Succ.MBB->getNumber()
          << " incoming CSR Saved: ";
-  for (int Reg : Succ.IncomingCSRSaved.set_bits())
-    errs() << Reg << " ";
+  for (const CSRSavedLocation &IncomingCSRLocation :
+       Succ.IncomingCSRLocations) {
+    if (IncomingCSRLocation.isValid()) {
+      IncomingCSRLocation.dump(errs());
+      errs() << " ";
+    }
+  }
   errs() << "\n";
 }
 
@@ -463,9 +513,12 @@ unsigned CFIInstrInserter::verify(MachineFunction &MF) {
       }
       // Check that IncomingCSRSaved of every successor matches the
       // OutgoingCSRSaved of CurrMBB
-      if (SuccMBBInfo.IncomingCSRSaved != CurrMBBInfo.OutgoingCSRSaved) {
-        reportCSRError(CurrMBBInfo, SuccMBBInfo);
-        ErrorNum++;
+      for (unsigned i = 0; i < CurrMBBInfo.OutgoingCSRLocations.size(); ++i) {
+        if (!(CurrMBBInfo.OutgoingCSRLocations[i] ==
+              SuccMBBInfo.IncomingCSRLocations[i])) {
+          reportCSRError(CurrMBBInfo, SuccMBBInfo);
+          ErrorNum++;
+        }
       }
     }
   }
diff --git a/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir b/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir
index 7844589e3f93c..a8547efde90cd 100644
--- a/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir
+++ b/llvm/test/CodeGen/RISCV/cfi-multiple-locations.mir
@@ -1,10 +1,8 @@
 # RUN: llc %s -mtriple=riscv64 \
 # RUN: -run-pass=cfi-instr-inserter \
 # RUN: -riscv-enable-cfi-instr-inserter=true
-# XFAIL: *
 
 # Technically, it is possible that a callee-saved register is saved in multiple different locations.
-# CFIInstrInserter should handle this, but currently it does not.
 ---
 name: multiple_locations
 tracksRegLiveness: true

@github-actions
Copy link

github-actions bot commented Nov 18, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@github-actions
Copy link

github-actions bot commented Nov 18, 2025

🐧 Linux x64 Test Results

  • 166067 tests passed
  • 2838 tests skipped
  • 6 tests failed

Failed Tests

(click on a test name to see its output)

LLVM

LLVM.CodeGen/X86/cfi-inserter-callee-save-register-2.mir
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register-2.mir -mtriple=x86_64-- -verify-cfiinstrs      -run-pass=cfi-instr-inserter 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register-2.mir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register-2.mir -mtriple=x86_64-- -verify-cfiinstrs -run-pass=cfi-instr-inserter
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register-2.mir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register-2.mir:12:10: error: CHECK: expected string not found in input
# | # CHECK: CFI_INSTRUCTION offset $rbp, -16
# |          ^
# | <stdin>:123:7: note: scanning from here
# |  bb.3:
# |       ^
# | <stdin>:126:2: note: possible intended match here
# |  CFI_INSTRUCTION def_cfa $rbp, 16
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register-2.mir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           118:  CFI_INSTRUCTION restore $r13 
# |           119:  CFI_INSTRUCTION restore $r14 
# |           120:  CFI_INSTRUCTION def_cfa $rsp, 8 
# |           121:  RET 0, killed $rax 
# |           122:   
# |           123:  bb.3: 
# | check:12'0           X error: no match found
# |           124:  successors: %bb.4(0x80000000) 
# | check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           125:   
# | check:12'0     ~~
# |           126:  CFI_INSTRUCTION def_cfa $rbp, 16 
# | check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:12'1      ?                                 possible intended match
# |           127:  CFI_INSTRUCTION register $r13, $rcx 
# | check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           128:  renamable $rdi = IMPLICIT_DEF 
# | check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           129:  renamable $rsi = IMPLICIT_DEF 
# | check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           130:   
# | check:12'0     ~~
# |           131:  bb.4: 
# | check:12'0     ~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.CodeGen/X86/cfi-inserter-callee-save-register.mir
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register.mir -mtriple=x86_64-- -verify-cfiinstrs      -run-pass=cfi-instr-inserter 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register.mir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register.mir -mtriple=x86_64-- -verify-cfiinstrs -run-pass=cfi-instr-inserter
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register.mir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register.mir:12:10: error: CHECK: expected string not found in input
# | # CHECK: CFI_INSTRUCTION restore $rbx
# |          ^
# | <stdin>:84:7: note: scanning from here
# |  bb.3:
# |       ^
# | <stdin>:85:2: note: possible intended match here
# |  RET 0, $rax
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-callee-save-register.mir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            79:  CFI_INSTRUCTION def_cfa_register $rbp 
# |            80:  CFI_INSTRUCTION offset $rbx, -24 
# |            81:  CFI_INSTRUCTION def_cfa $rsp, 8 
# |            82:  RET 0, $rax 
# |            83:   
# |            84:  bb.3: 
# | check:12'0           X error: no match found
# |            85:  RET 0, $rax 
# | check:12'0     ~~~~~~~~~~~~~
# | check:12'1      ?            possible intended match
# |            86: ... 
# | check:12'0     ~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
not --crash /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir -mtriple=x86_64--      -run-pass=cfi-instr-inserter 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir
# executed command: not --crash /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir -mtriple=x86_64-- -run-pass=cfi-instr-inserter
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir:13:10: error: CHECK: expected string not found in input
# | # CHECK: Different saved locations for the same CSR
# |          ^
# | <stdin>:1:1: note: scanning from here
# | --- |
# | ^
# | <stdin>:33:1: note: possible intended match here
# | failsVerification: false
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: --- | 
# | check:13'0     X~~~~~ error: no match found
# |             2:  ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir' 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3:  source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/cfi-inserter-verify-inconsistent-loc.mir" 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             4:  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5:  target triple = "x86_64-unknown-unknown" 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6:   
# | check:13'0     ~~
# |             .
# |             .
# |             .
# |            28: hasEHContTarget: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |            29: hasEHScopes: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~
# |            30: hasEHFunclets: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~
# |            31: isOutlined: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~
# |            32: debugInstrRef: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~
# |            33: failsVerification: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:13'1     ?                         possible intended match
# |            34: tracksDebugUserValues: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            35: registers: [] 
# | check:13'0     ~~~~~~~~~~~~~~
# |            36: liveins: [] 
# | check:13'0     ~~~~~~~~~~~~
# |            37: frameInfo: 
# | check:13'0     ~~~~~~~~~~~
# |            38:  isFrameAddressTaken: false 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.CodeGen/X86/segmented-stacks-dynamic.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll -mcpu=generic -mtriple=i686-linux -verify-machineinstrs | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll -check-prefix=X86
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mcpu=generic -mtriple=i686-linux -verify-machineinstrs
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll -check-prefix=X86
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll:64:13: error: X86-NEXT: expected string not found in input
# | ; X86-NEXT: .cfi_restore %ebp
# |             ^
# | <stdin>:57:9: note: scanning from here
# | .LBB0_1:
# |         ^
# | <stdin>:65:2: note: possible intended match here
# |  .cfi_endproc
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           52:  leal -4(%ebp), %esp 
# |           53:  popl %esi 
# |           54:  popl %ebp 
# |           55:  .cfi_def_cfa %esp, 4 
# |           56:  retl 
# |           57: .LBB0_1: 
# | next:64'0             X error: no match found
# |           58:  pushl $4 
# | next:64'0     ~~~~~~~~~~
# |           59:  pushl $12 
# | next:64'0     ~~~~~~~~~~~
# |           60:  calll __morestack 
# | next:64'0     ~~~~~~~~~~~~~~~~~~~
# |           61:  retl 
# | next:64'0     ~~~~~~
# |           62:  jmp .LBB0_2 
# | next:64'0     ~~~~~~~~~~~~~
# |           63: .Lfunc_end0: 
# | next:64'0     ~~~~~~~~~~~~~
# |           64:  .size test_basic, .Lfunc_end0-test_basic 
# | next:64'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           65:  .cfi_endproc 
# | next:64'0     ~~~~~~~~~~~~~~
# | next:64'1      ?             possible intended match
# |           66:  # -- End function 
# | next:64'0     ~~~~~~~~~~~~~~~~~~~
# |           67:  .section ".note.GNU-split-stack","",@progbits 
# | next:64'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           68:  .section ".note.GNU-stack","",@progbits 
# | next:64'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.CodeGen/X86/segmented-stacks.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks.ll -mcpu=generic -mtriple=i686-linux -verify-machineinstrs | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks.ll -check-prefix=X86-Linux
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mcpu=generic -mtriple=i686-linux -verify-machineinstrs
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks.ll -check-prefix=X86-Linux
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks.ll:306:19: error: X86-Linux-NEXT: expected string not found in input
# | ; X86-Linux-NEXT: .cfi_restore %esi
# |                   ^
# | <stdin>:65:9: note: scanning from here
# | .LBB1_1:
# |         ^
# | <stdin>:73:2: note: possible intended match here
# |  .cfi_endproc
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            60:  addl $40, %esp 
# |            61:  .cfi_def_cfa_offset 8 
# |            62:  popl %esi 
# |            63:  .cfi_def_cfa_offset 4 
# |            64:  retl 
# |            65: .LBB1_1: 
# | next:306'0             X error: no match found
# |            66:  pushl $4 
# | next:306'0     ~~~~~~~~~~
# |            67:  pushl $44 
# | next:306'0     ~~~~~~~~~~~
# |            68:  calll __morestack 
# | next:306'0     ~~~~~~~~~~~~~~~~~~~
# |            69:  retl 
# | next:306'0     ~~~~~~
# |            70:  jmp .LBB1_2 
# | next:306'0     ~~~~~~~~~~~~~
# |            71: .Lfunc_end1: 
# | next:306'0     ~~~~~~~~~~~~~
# |            72:  .size test_nested, .Lfunc_end1-test_nested 
# | next:306'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            73:  .cfi_endproc 
# | next:306'0     ~~~~~~~~~~~~~~
# | next:306'1      ?             possible intended match
# |            74:  # -- End function 
# | next:306'0     ~~~~~~~~~~~~~~~~~~~
# |            75:  .globl test_large # -- Begin function test_large 
# | next:306'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            76:  .p2align 4 
# | next:306'0     ~~~~~~~~~~~~
# |            77:  .type test_large,@function 
# | next:306'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            78: test_large: # @test_large 
# | next:306'0     ~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.DebugInfo/MIR/X86/no-cfi-loc.mir
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -start-after=prologepilog -mtriple=x86_64 -use-unknown-locations=Enable /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -start-after=prologepilog -mtriple=x86_64 -use-unknown-locations=Enable /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir -o -
# .---command stderr------------
# | llc: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:295: reference llvm::SmallVectorTemplateCommon<(anonymous namespace)::CFIInstrInserter::CSRSavedLocation>::operator[](size_type) [T = (anonymous namespace)::CFIInstrInserter::CSRSavedLocation]: Assertion `idx < size()' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -start-after=prologepilog -mtriple=x86_64 -use-unknown-locations=Enable /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir -o -
# | 1.	Running pass 'Function Pass Manager' on module '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir'.
# | 2.	Running pass 'Check CFA info and insert CFI instructions if needed' on function '@foo'
# |  #0 0x0000000007eba458 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:834:13
# |  #1 0x0000000007eb7b65 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:105:18
# |  #2 0x0000000007ebb221 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #3 0x00007b6ae8f81330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00007b6ae8fdab2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# |  #5 0x00007b6ae8f8127e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# |  #6 0x00007b6ae8f648ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# |  #7 0x00007b6ae8f6481b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
# |  #8 0x00007b6ae8f77517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
# |  #9 0x0000000006cc9f9a back /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/MachineBasicBlock.h:359:0
# | #10 0x0000000006cc9f9a isReturnBlock /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/MachineBasicBlock.h:982:24
# | #11 0x0000000006cc9f9a verify /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:509:64
# | #12 0x0000000006cc9f9a (anonymous namespace)::CFIInstrInserter::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:59:31
# | #13 0x0000000006ebdab3 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #14 0x000000000742c175 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1398:27
# | #15 0x0000000007434122 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #16 0x000000000742cc1c runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #17 0x000000000742cc1c llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #18 0x0000000004da0408 compileModule(char**, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:0:8
# | #19 0x0000000004d9d7a0 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:451:13
# | #20 0x00007b6ae8f661ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #21 0x00007b6ae8f6628b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #22 0x0000000004d99225 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4d99225)
# `-----------------------------
# error: command failed with exit status: -6
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir
# `-----------------------------
# error: command failed with exit status: 2

--

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

Currently there is an implicit assumption in `CFIInstrInserter` that a CSR can
be saved only in one location. However, scenarios when this assumption breaks are possible.
@mgudim mgudim force-pushed the cfi_multiple_locations branch from 9d45640 to b186974 Compare November 18, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants